package csc.fresher.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import csc.fresher.dao.CurrencyDao;
import csc.fresher.entity.Currency;
import csc.fresher.service.CurrencyService;

@Service
public class CurrencyServiceImpl implements CurrencyService {

	@Autowired
	CurrencyDao currencyDao;

	@Override
	public Currency getCurrencyByID(int currencyID) {
		Currency currency = null;
		if (currencyDao != null)
			currency = currencyDao.getCurrencyByID(currencyID);
		else
			System.err.println("currency dao is null");
		return currency;
	}
	
	@Override
	public List<Currency> getAllCurrency(){
		return currencyDao.getAllCurrency();
	}

}
